Skip to content

Conversation

@geoberle
Copy link
Collaborator

What this PR does

support configuration via environment variables instead of config file. this way deployment via azure container app should be more convenient

Jira:
Link to demo recording:

Special notes for your reviewer

support configuration via environment variables instead of config file.
this way deployment via azure container app should be more convenient

Signed-off-by: Gerd Oberlechner <[email protected]>
@@ -0,0 +1,62 @@
package main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I not have used golang for this, but plain .sh, since it's available as well. 🤷‍♂️

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about an alternative approach:

  1. Use tempaltize to generate the configuration
  2. Encode it base64, pass it in as environment variable
  3. Decode and write it to a file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like the base64 option. i'll go for it

Signed-off-by: Gerd Oberlechner <[email protected]>
--set ocmirrorTag=latest \
--set credsPullSecret=pull-secret \
--set credsKeyVaultName=service-kv-aro-hcp-dev
--set credsKeyVaultName=aro-hcp-dev-svc-kv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a param?

@@ -1,9 +1,9 @@
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 AS downloader
FROM --platform=linux/amd64 mcr.microsoft.com/cbl-mariner/base/core:2.0 AS downloader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to specify platform here? Should the container infer it depending on the platform you run on?


image:
cp ../configuration/mvp-oc-mirror.yml config.yml
docker build --platform="linux/amd64" -f "./Dockerfile" -t ${OC_MIRROR_IMAGE_TAGGED} .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs say "podman" can we update docker -> podman or vice versa? Or do we have a preference?

platform:
architectures:
- multi
- amd64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need amd64 images still, or can we switch everything to multi yet?

@github-actions
Copy link

github-actions bot commented Nov 1, 2024

Please rebase pull request.

@geoberle
Copy link
Collaborator Author

geoberle commented Nov 1, 2024

closing this as it has been implemented as discussed in the #762

@geoberle geoberle closed this Nov 1, 2024
@geoberle geoberle deleted the oc-mirror branch November 28, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants